﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SparePartLendRecord.aspx.cs" Inherits="WXYW.SparePartLendRecord" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    借用记录
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox><asp:LinkButton
        ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton><asp:LinkButton
            ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
    <img src="image/operateicon/print.gif" alt="" />
    <a onclick="preview()">打印</a>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <asp:GridView ID="LendRecordGridView" runat="server" AutoGenerateColumns="False"
        OnRowCommand="LendRecordGridView_RowCommand" OnRowDataBound="LendRecordGridView_RowDataBound"
        CssClass="tableList" Width="100%" EnableModelValidation="True" AllowPaging="True"
        OnPageIndexChanging="LendRecordGridView_PageIndexChanging">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ExceedDays" HeaderText="超期日期">
                <HeaderStyle Wrap="False" />
                <ItemStyle Font-Bold="True" ForeColor="Red" />
            </asp:BoundField>
            <asp:BoundField DataField="ModelNumber" HeaderText="产品型号">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="VersionNumber" HeaderText="版本号">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Count" HeaderText="借用数量">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Customer" HeaderText="客户名称">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="ContactPerson" HeaderText="联系人">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="邮箱">
                <ItemTemplate>
                    <asp:TextBox ID="emailTxt" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("Email") %>' ReadOnly="true" Columns="10" ToolTip='<%# Bind("Email") %>'></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField DataField="Phone" HeaderText="联系电话">
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:BoundField DataField="Address" HeaderText="联系地址">
                <HeaderStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="借用原因">
                <ItemTemplate>
                    <asp:TextBox ID="lendReasonTxt" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("Reason") %>' ReadOnly="true" Columns="10"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="借用日期">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("LendDate") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="截止日期">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Deadline") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="借用类型">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("LendType") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="归还备注">
                <ItemTemplate>
                    <asp:TextBox ID="rtnRemakTxt" runat="server" CssClass="NOBorderTxtBox" TextMode="MultiLine"
                        Rows="1" Text='<%# Bind("BackComment") %>' ReadOnly="true" Columns="10"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="当前状态">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="backLinkButton" runat="server" CausesValidation="false" CommandName="Back"
                        Text="归还" CommandArgument='<%#Eval("ID") %>'></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <PagerStyle HorizontalAlign="Center" VerticalAlign="Bottom" />
    </asp:GridView>
    <asp:HiddenField ID="HiddenField" runat="server" />
    <Ajax:ModalPopupExtender ID="BackPopupExtender" TargetControlID="HiddenField" PopupControlID="BackNoticePanel"
        BackgroundCssClass="modalBackground" runat="server" Drag="true" PopupDragHandleControlID="NoticeDragBar"
        CancelControlID="closeButton">
    </Ajax:ModalPopupExtender>
    <asp:Panel ID="BackNoticePanel" CssClass="modalPopup" Width="500px" runat="server"
        DefaultButton="backButton">
        <!-- Header -->
        <div class="box-header" id="NoticeDragBar">
            <img src="image/stdBox_left_top.gif" alt="" />
            <h2>
                备件归还
            </h2>
        </div>
        <div class="functionPanel">
            <table>
                <tr>
                    <td>
                        产品型号：
                    </td>
                    <td>
                        <asp:TextBox ID="modelNumberTxtBox" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        版本号：
                    </td>
                    <td>
                        <asp:TextBox ID="versionNumberTxtBox" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        借用数量：
                    </td>
                    <td>
                        <asp:TextBox ID="lendCountTxtBox" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        借用日期：
                    </td>
                    <td>
                        <asp:TextBox ID="lendDateTxtBox" runat="server" Enabled="false"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        归还日期：
                    </td>
                    <td>
                        <asp:TextBox ID="backDateTxtBox" runat="server" Enabled="false"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        归还备注：
                    </td>
                    <td colspan="3">
                        <asp:TextBox ID="returnComment" runat="server" Width="100%" TextMode="MultiLine"
                            Rows="2"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:Label ID="warningInfo" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr style="text-align: center">
                    <td colspan="4">
                        <asp:Button ID="backButton" runat="server" Text="归还" OnClick="backButton_Click" />
                        <asp:Button ID="closeButton" runat="server" Text="关闭" />
                        <input type="reset" name="resetBtn" value="重置" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="box-footer">
            <img alt="" src="image/stdBox_left_bottom.gif" />
            <p>
                &nbsp;</p>
        </div>
    </asp:Panel>
</asp:Content>
